<?php
include($classes_path.'/class.postDetails.php');
$pagepost = new postDetails();
$pagepost->set_id($article);
$pagepost->set_page($epage);
?>

<form class="cms_form_edit" method="POST" action="" enctype="multipart/form-data">
    <h3>Title</h3>
    <input type="text" class="inputtxt_title" name="title" value="<?php print($title); ?>" /><br /><br />
    <h3>Category</h3>
    <select class="cms_dropdown" name="category">
        <option><?php print($pagepost->get_category()); ?></option>
        <?php
        $catList = $pagepost->get_categoryList();
        foreach($catList as $category) {
            print('<option value="'.$category['category'].'">'.$category['category'].'</option>');
        }
        ?>
    </select><br /><br />
    <h3>Tags</h3>
    <input type="text" class="inputtxt" name="tags" value="<?php print($tags); ?>" /><br /><br />
    <h3>Thumbnail <span class="time">This will display in headlines</span></h3>
    <input type="text" class="inputtxt" name="thumb" value="<?php print($thumb); ?>" /><br /><br />
    <h3>Summary</h3>
    <textarea name="summary" class="cms_txtarea" rows="0" cols="0"><?php print($summary); ?></textarea><br /><br />
    <h3>Gallery <span class="grey">Separate values by comma (ie: foo.jpg, bar.jpg)</span></h3>
    <input type="text" class="inputtxt" name="gallery" value="<?php print($gallery); ?>" /><br /><br />
    <h3>Content</h3>
    <textarea name="body" class="wysiwyg" rows="0" cols="0"><?php print($body); ?></textarea><br />
    <input type="checkbox" name="headline" value="true" <?php print($checked); ?> /><p class="inline">Set post as headline</p><br />
    <input type="checkbox" name="featured" value="1" <?php print($checked); ?> /><p class="inline">Set featured item</p><br />
    <input type="checkbox" name="draft" value="1" <?php print($checked); ?> /><p class="inline">Save post as draft</p><br /><br />
    <h3>Links <span class="grey">Separate values by comma without "http://www" (ie: foo.com, bar.com)</span></h3>
    <input type="text" class="inputtxt" name="links" value="<?php print($links); ?>" /><br /><br />
    <input type="submit" value="Confirm changes" />
</form>